<!DOCTYPE html>
<html lang="en">

<!-- Head tag (contains Google-Analytics、Baidu-Tongji)-->
<head>
  <!-- Google Analytics -->
  

  <!-- Baidu Tongji -->
  
    <script type="text/javascript">
      // Originial
      var _hmt = _hmt || [];
      (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?cdf616a127124dd7ff798963125b304d";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
  

  <!-- Baidu Push -->
  
    <script>
      (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
          bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
          bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
      })();
    </script>
  

  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>

  <meta name="google-site-verification" content="lxDfCplOZbIzjhG34NuQBgu2gdyRlAtMB4utP5AgEBc"/>
  <meta name="baidu-site-verification" content="PpzM9WxOJU"/>

  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <meta name="description" content="It&#39;s an IT blog..."/>
  <meta name="keyword" content="zhuang,IT  blog,Blog"/>
  <link rel="shortcut icon" href="/img/avatar/java-head.png"/>

  <!-- Place this tag in your head or just before your close body tag. -->
  <script async="async" defer="defer" src="https://buttons.github.io/buttons.js"></script>

  
    <!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="/css/bootstrap.min.css"/>

    <!-- Custom CSS -->
    <link rel="stylesheet" href="/css/beantech.min.css"/>

    <!-- Pygments Highlight CSS -->
    <link rel="stylesheet" href="/css/highlight.css"/>
    <link rel="stylesheet" href="/css/widget.css"/>
    <link rel="stylesheet" href="/css/rocket.css"/>
    <link rel="stylesheet" href="/css/signature.css"/>
    <link rel="stylesheet" href="/css/catalog.css"/>
    <link rel="stylesheet" href="/css/livemylife.css"/>

    
      <!-- wave start -->
      <link rel="stylesheet" href="/css/wave.css"/>
      <!-- wave end -->
    

    
      <!-- top start (article top hot config) -->
      <link rel="stylesheet" href="/css/top.css"/>
      <!-- top end -->
    

    
      <!-- ThemeColor start -->
      <link rel="stylesheet" href="/css/scroll.css"/>
      <!-- ThemeColor end -->
    

    
      <!-- viewer start (Picture preview) -->
      <link rel="stylesheet" href="/css/viewer.min.css"/>
      <!-- viewer end -->
    

    
      <!-- Search start -->
      <link rel="stylesheet" href="/css/search.css"/>
      <!-- Search end -->
    

    
      <!-- ThemeColor start -->
      <link rel="stylesheet" href="/css/themecolor.css"/>
      <!-- ThemeColor end -->
    

    

    
  

  <!-- Custom Fonts -->
  <!-- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
  <!-- Hux change font-awesome CDN to qiniu -->
  <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.5.0/css/font-awesome.min.css" type="text/css">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

  <!-- Hux Delete, sad but pending in China <link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'> <link
  href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/ css'> -->

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]-->

  <!-- ga & ba script hoook -->
  <link rel="canonical" href="http://yoursite-url/archives/2020/04/">
  <title>
    
      either thin | or die
    
  </title>
<meta name="generator" content="Hexo 5.4.0"></head>


<!-- hack iOS CSS :active style -->

	<body ontouchstart="" class="body--light body--dark">


		<!-- ThemeColor -->
		
		<!-- ThemeColor -->
<style type="text/css">
  .body--light {
    --light-mode: none;
    --dark-mode: block;
  }
  .body--dark {
    --light-mode: block;
    --dark-mode: none;
  }
  i.mdui-icon.material-icons.light-mode {
    display: var(--light-mode);
  }
  i.mdui-icon.material-icons.dark-mode {
    display: var(--dark-mode);
  }
</style>
<div class="toggle" onclick="document.body.classList.toggle('body--dark')">
  <i class="mdui-icon material-icons light-mode"></i>
  <i class="mdui-icon material-icons dark-mode"></i>
</div>
<script>
  //getCookieValue
  function getCookieValue(a) {
    var b = document.cookie.match('(^|[^;]+)\\s*' + a + '\\s*=\\s*([^;]+)');
    return b
      ? b.pop()
      : '';
  }
  let themeMode = 'dark';
  if (getCookieValue('sb-color-mode') && (getCookieValue('sb-color-mode') !== themeMode)) {
    let dbody = document.body.classList;
    themeMode === 'dark' ? dbody.remove('body--dark') : dbody.add('body--dark');
  }

  //setCookieValue
  var toggleBtn = document.querySelector(".toggle");
  toggleBtn.addEventListener("click", function () {
    var e = document.body.classList.contains("body--dark");
    var cookieString = e
      ? "dark"
      : "light";
    var exp = new Date();
    exp.setTime(exp.getTime() + 3 * 24 * 60 * 60 * 1000); //3天过期
    document.cookie = "sb-color-mode=" + cookieString + ";expires=" + exp.toGMTString() + ";path=/";
  });
</script>

		

		<!-- Gitter -->
		

		<!-- Navigation (contains search)-->
		<!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header page-scroll">
      <button type="button" class="navbar-toggle">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/">平平淡淡</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <!-- Known Issue, found by Hux: <nav>'s height woule be hold on by its content. so, when navbar scale out, the <nav> will cover tags. also mask any touch event of tags, unfortunately. -->
    <div id="huxblog_navbar">
      <div class="navbar-collapse">
        <ul class="nav navbar-nav navbar-right">
          <li>
            <a href="/">首页</a>
          </li>

          
          
          
          
          <li>
            <a href="/archive/">
              
              归档
              
              
            </a>
          </li>
          
          
          
          <li>
            <a href="/tags/">
              
              标签
              
              
            </a>
          </li>
          
          
          
          <li>
            <a href="/categories/">
              
              分类
              
              
            </a>
          </li>
          
          
          
          <li>
            <a href="/about/">
              
              关于
              
              
            </a>
          </li>
          
          

          
          <li>
            <a class="popup-trigger">
              <span class="search-icon"></span>搜索</a>
          </li>
          

          <!-- LangSelect -->
          
        </ul>
      </div>
    </div>
    <!-- /.navbar-collapse -->
  </div>
  <!-- /.container -->
</nav>
<!-- progress -->
<div id="progress">
  <div class="line" style="width: 0%;"></div>
</div>

<script>
  // Drop Bootstarp low-performance Navbar Use customize navbar with high-quality material design animation in high-perf jank-free CSS3 implementation
  var $body = document.body;
  var $toggle = document.querySelector('.navbar-toggle');
  var $navbar = document.querySelector('#huxblog_navbar');
  var $collapse = document.querySelector('.navbar-collapse');

  $toggle.addEventListener('click', handleMagic)

  function handleMagic(e) {
    if ($navbar.className.indexOf('in') > 0) {
      // CLOSE
      $navbar.className = " ";
      // wait until animation end.
      setTimeout(function() {
        // prevent frequently toggle
        if ($navbar.className.indexOf('in') < 0) {
          $collapse.style.height = "0px"
        }
      }, 400)
    } else {
      // OPEN
      $collapse.style.height = "auto"
      $navbar.className += " in";
    }
  }
</script>


		<!-- Post Header (contains intro-header、signature、wordcount、busuanzi、waveoverlay) -->
		<!-- Modified by Yu-Hsuan Yen -->
<!-- Post Header -->

  <style type="text/css">
    .body--light {
      /* intro-header */
      --intro-header-background-image-url-home: url('/img/header_img/home_bg1.jpg');
      --intro-header-background-image-url-post: url('');
      --intro-header-background-image-url-page: url('/img/header_img/archive_bg1.jpg');
    }
    .body--dark {
      --intro-header-background-image-url-home: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), url('/img/header_img/home_bg1.jpg');
      --intro-header-background-image-url-post: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), url('');
      --intro-header-background-image-url-page: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), url('/img/header_img/archive_bg1.jpg');
    }

    header.intro-header {
       /*page*/
        background-image: var(--intro-header-background-image-url-page);
        /* background-image: url('/img/header_img/archive_bg1.jpg'); */
      
    }

    
      #signature {/*signature*/
        background-image: url('/img/signature/signature.png');
      }
    
  </style>





<header class="intro-header">
  <!-- Signature -->
  <div id="signature">
    <div class="container">
      <div class="row">
        <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
          
          <div class="site-heading">
            <h1>平平淡淡</h1>
            <!--<hr class="small">-->
            <span class="subheading">Live in the present</span>
          </div>
          
        </div>
      </div>
    </div>
  </div>

  
  <!-- waveoverlay start -->
  <div class="preview-overlay">
    <svg class="preview-waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto">
      <defs>
        <path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"></path>
      </defs>
      <g class="preview-parallax">
        <use xlink:href="#gentle-wave" x="48" y="0" fill=var(--gentle-wave1)></use>
        <use xlink:href="#gentle-wave" x="48" y="3" fill=var(--gentle-wave2)></use>
        <use xlink:href="#gentle-wave" x="48" y="5" fill=var(--gentle-wave3)></use>
        <use xlink:href="#gentle-wave" x="48" y="7" fill=var(--gentle-wave)></use>
      </g>
    </svg>
  </div>
  <!-- waveoverlay end -->
  

</header>



		<!-- Main Content (Post contains
	Pager、
	tip、
	socialshare、
	gitalk、gitment、disqus-comment、
	Catalog、
	Sidebar、
	Featured-Tags、
	Friends Blog、
	anchorjs、
	) -->
		<!-- Main Content -->
<div class="container">
  <div class="row">
    

    <!-- USE SIDEBAR -->
    <!-- Post Container -->
    <div class="
                col-lg-8 col-lg-offset-1
                col-md-8 col-md-offset-1
                col-sm-12
                col-xs-12
                post-container
            ">

      <!-- Main Content -->
<div class="container">
  <div class="row">
    <div class="col-lg-8 col-lg-offset-0 col-md-10 col-md-offset-1">
      <!-- 归档列表 -->

      

      <!-- 归档列表 -->
      
      <div class="one-tag-list">
        <span class="fa fa-calendar-times-o listing-seperator" id="2021">
          <span class="tag-text">2021</span>
        </span>
        <ul>
          
          <li>
            11-04
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/juc/JUC共享模型/" style="color: #0085a1">
              <span>
                JUC共享模型
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            11-03
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/juc/JUC模式/" style="color: #0085a1">
              <span>
                JUC模式
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            11-03
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/juc/JUC应用/" style="color: #0085a1">
              <span>
                JUC应用
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            11-03
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/juc/JUC并发应用/" style="color: #0085a1">
              <span>
                JUC并发应用
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            11-02
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/项目所需程序/Canal/" style="color: #0085a1">
              <span>
                Canal
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            11-02
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/juc/JUC基础/" style="color: #0085a1">
              <span>
                JUC基础
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            11-01
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/jvm/JVM垃圾回收/" style="color: #0085a1">
              <span>
                JVM垃圾回收
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            11-01
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/jvm/Java内存模型/" style="color: #0085a1">
              <span>
                Java内存模型
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-27
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/nginx/nginx下载站点/" style="color: #0085a1">
              <span>
                nginx下载站点
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-27
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/nginx/nginx高可用/" style="color: #0085a1">
              <span>
                nginx高可用
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-27
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/nginx/nginx动静分离/" style="color: #0085a1">
              <span>
                nginx动静分离
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-27
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/jvm/JVM类加载与字节码技术/" style="color: #0085a1">
              <span>
                JVM类加载与字节码技术
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-26
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/nginx/nginx缓存集成/" style="color: #0085a1">
              <span>
                nginx缓存集成
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-25
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/nginx/nginx负载均衡/" style="color: #0085a1">
              <span>
                nginx负载均衡
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-25
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/nginx/nginx安全控制/" style="color: #0085a1">
              <span>
                nginx安全控制
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-23
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/nginx/nginx反向代理/" style="color: #0085a1">
              <span>
                nginx反向代理
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-21
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/jvm/JVM内存结构/" style="color: #0085a1">
              <span>
                JVM内存结构
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/mysql/MySQL基础（二）/" style="color: #0085a1">
              <span>
                MySQL基础（二）
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-19
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/nginx/nginx进阶篇（一）/" style="color: #0085a1">
              <span>
                nginx进阶篇（一）
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-18
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/nginx/nginx安装方式/" style="color: #0085a1">
              <span>
                nginx安装
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-16
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/liunx/Mysql安装/" style="color: #0085a1">
              <span>
                liun下安装mysql
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-16
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/liunx/makefile/" style="color: #0085a1">
              <span>
                Untitled
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-16
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/liunx/ssh安装/" style="color: #0085a1">
              <span>
                liun安装ssh
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-15
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/liunx/jdk安装/" style="color: #0085a1">
              <span>
                liun下安装jdk
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-14
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/nginx/nginx基础篇/" style="color: #0085a1">
              <span>
                nginx基础篇
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-12
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/java/Java NIO/" style="color: #0085a1">
              <span>
                Java NIO
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-12
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/mysql/MySQL基础（一）/" style="color: #0085a1">
              <span>
                MySQL基础（一）
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-12
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/mysql/MySQL窗口函数/" style="color: #0085a1">
              <span>
                MySQL窗口函数
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-08
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/java/IO/" style="color: #0085a1">
              <span>
                Untitled
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            09-22
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/大数据/word2vec/" style="color: #0085a1">
              <span>
                Untitled
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            09-21
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/mysql/SQL教程/" style="color: #0085a1">
              <span>
                SQL基础
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            09-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/mysql/Redis初学/" style="color: #0085a1">
              <span>
                Redis初学
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            09-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/设计模式/Memento/" style="color: #0085a1">
              <span>
                备忘录模式
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            09-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/设计模式/State/" style="color: #0085a1">
              <span>
                状态模式
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            09-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/设计模式/Template/" style="color: #0085a1">
              <span>
                模板模式
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            09-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/设计模式/Proxy/" style="color: #0085a1">
              <span>
                代理模式
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            09-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/设计模式/Singleton/" style="color: #0085a1">
              <span>
                单例模式
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            09-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/面试/第一次笔试面试/" style="color: #0085a1">
              <span>
                面试初级Java开发
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            08-30
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/java/HashMap/" style="color: #0085a1">
              <span>
                HashMap源码分析
                
                -- cn
                
              </span>
            </a>
          </li>
          
        </ul>
      </div>
      
      <div class="one-tag-list">
        <span class="fa fa-calendar-times-o listing-seperator" id="2020">
          <span class="tag-text">2020</span>
        </span>
        <ul>
          
          <li>
            12-26
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/python/正则表达式/" style="color: #0085a1">
              <span>
                python基础 > 正则表达式
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            12-09
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/python/数据永久化/" style="color: #0085a1">
              <span>
                python基础 > 数据永久化
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            11-26
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/python/文本处理/" style="color: #0085a1">
              <span>
                python基础 > 文本处理
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            11-17
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/python/面向对象程序设计/" style="color: #0085a1">
              <span>
                python基础 > 面向对象程序设计
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            11-11
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/python/函数/" style="color: #0085a1">
              <span>
                python基础 > 函数
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-25
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/spring/SpringSecurity入门/" style="color: #0085a1">
              <span>
                SpringSecurity入门
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/前端/AngularJS/" style="color: #0085a1">
              <span>
                前端框架AngularJS入门
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            10-15
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/python/程序控制结构/" style="color: #0085a1">
              <span>
                python基础 > 程序控制结构
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            09-28
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/python/详解Python序列结构/" style="color: #0085a1">
              <span>
                python基础 > 详解Python序列结构
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            09-13
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/python/运算符、表达式与内置对象/" style="color: #0085a1">
              <span>
                python基础 > 运算符、表达式与内置对象
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            04-28
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/spring/Spring整合MyBatis原理/" style="color: #0085a1">
              <span>
                Spring整合MyBatis原理
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            04-23
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/mysql/MySQL事务与锁机制详解/" style="color: #0085a1">
              <span>
                MySQL事务与锁机制详解
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            04-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/java/HashSet/" style="color: #0085a1">
              <span>
                HashSet源码分析
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            04-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/java/Lucene/" style="color: #0085a1">
              <span>
                全文检索技术 Lucene
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            04-20
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/mysql/MySQL索引深入剖析/" style="color: #0085a1">
              <span>
                MySQL索引深入剖析
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            04-18
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/mysql/MySQL体系结构/" style="color: #0085a1">
              <span>
                MySQL体系结构
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            04-15
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/面试/复习面试题中遇到的问题/" style="color: #0085a1">
              <span>
                复习面试题中遇到的问题
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            04-14
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/java/LinkedList/" style="color: #0085a1">
              <span>
                LinkedList 基于JDK11
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            04-11
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/java/ArrayList/" style="color: #0085a1">
              <span>
                ArrayList
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            04-03
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/前端/MVVM/" style="color: #0085a1">
              <span>
                MVVM
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            03-29
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/spring/Spring/" style="color: #0085a1">
              <span>
                Spring
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            03-24
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/面试/Tomcat调优/" style="color: #0085a1">
              <span>
                Tomcat的自身调优
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            03-22
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/面试/面试题——java基本（集合）/" style="color: #0085a1">
              <span>
                复习面试题 —— Collection体系
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            03-17
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/算法/排序/sort/" style="color: #0085a1">
              <span>
                几大排序方法
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            03-16
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/java/JavaSE核心知识点梳理/" style="color: #0085a1">
              <span>
                JavaSE核心知识点梳理
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            03-10
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/javaScript/js判断是否为空对象/" style="color: #0085a1">
              <span>
                js判断是否为空对象
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            03-10
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/面试/面试复习/" style="color: #0085a1">
              <span>
                面试总复习（一）
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            03-08
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/spring/SSM整合Swagger/" style="color: #0085a1">
              <span>
                SSM整合Swagger
                
                -- cn
                
              </span>
            </a>
          </li>
          
          <li>
            03-08
            <i class="fa fa-angle-double-right" aria-hidden="true"></i>
            <a href="/cn/spring/hibernate-validator/" style="color: #0085a1">
              <span>
                hibernate-validator
                
                -- cn
                
              </span>
            </a>
          </li>
          
        </ul>
      </div>
      
    </div>
  </div>
</div>


      <!-- 如果开启评论功能 -->
      
    </div>

    <!-- Sidebar Container -->
<div class="
    col-lg-3 col-lg-offset-0
    col-md-3 col-md-offset-0
    col-sm-12
    col-xs-12
    sidebar-container
">
    
        <!-- Featured Tags -->

<section>
  <h5><a href="/tags/">特色标签</a></h5>
  <div class="tags">
    
    
    <a href="/tags/#java" title="java" rel="33">java</a>
    
    
    
    <a href="/tags/#面试" title="面试" rel="11">面试</a>
    
    
    
    <a href="/tags/#集合" title="集合" rel="5">集合</a>
    
    
    
    <a href="/tags/#检索" title="检索" rel="1">检索</a>
    
    
    
    <a href="/tags/#juc" title="juc" rel="5">juc</a>
    
    
    
    <a href="/tags/#jvm" title="jvm" rel="3">jvm</a>
    
    
    
    <a href="/tags/#jmm" title="jmm" rel="1">jmm</a>
    
    
    
    <a href="/tags/#liunx" title="liunx" rel="3">liunx</a>
    
    
    
    <a href="/tags/#安装" title="安装" rel="3">安装</a>
    
    
    
    <a href="/tags/#jdk" title="jdk" rel="1">jdk</a>
    
    
    
    <a href="/tags/#数据库" title="数据库" rel="8">数据库</a>
    
    
    
    <a href="/tags/#mysql" title="mysql" rel="8">mysql</a>
    
    
    
    <a href="/tags/#redis" title="redis" rel="1">redis</a>
    
    
    
    <a href="/tags/#SQL" title="SQL" rel="4">SQL</a>
    
    
    
    <a href="/tags/#nginx" title="nginx" rel="10">nginx</a>
    
    
    
    <a href="/tags/#反向代理" title="反向代理" rel="3">反向代理</a>
    
    
    
    <a href="/tags/#负载均衡" title="负载均衡" rel="2">负载均衡</a>
    
    
    
    <a href="/tags/#python" title="python" rel="8">python</a>
    
    
    
    <a href="/tags/#基础" title="基础" rel="8">基础</a>
    
    
    
    <a href="/tags/#spring" title="spring" rel="5">spring</a>
    
    
    
    <a href="/tags/#SSM" title="SSM" rel="1">SSM</a>
    
    
    
    <a href="/tags/#JavaScript" title="JavaScript" rel="2">JavaScript</a>
    
    
    
    <a href="/tags/#设计模式" title="设计模式" rel="5">设计模式</a>
    
    
    
    <a href="/tags/#mybatis" title="mybatis" rel="1">mybatis</a>
    
    
    
    <a href="/tags/#Canal" title="Canal" rel="1">Canal</a>
    
    
    
    <a href="/tags/#tomcat" title="tomcat" rel="1">tomcat</a>
    
    
    
    <a href="/tags/#算法" title="算法" rel="1">算法</a>
    
    
    
    <a href="/tags/#排序" title="排序" rel="1">排序</a>
    
    
    
    <a href="/tags/#AngularJS" title="AngularJS" rel="1">AngularJS</a>
    
    
  </div>
</section>


        <hr>
    
        <!-- Short About -->
<section class="visible-md visible-lg">
  <h5><a href="/about/">关于自己</a></h5>
  <div class="short-about">

    
    <img id="avatar_pic" src="/img/avatar/fatpeople.jpg" alt="avatar_pic" style="box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, .5);
    -moz-box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, .5);
    -webkit-box-shadow: 5px 5px 10px 5px rgba(0, 0, 0, .5);" />
    

    
    <p>Fat people have no future, either thin or die...</p>
    

    <!-- SNS Link -->
    <ul class="list-inline">
      

      

      

      

      

      

      

      

    </ul>
  </div>
</section>

        <hr>
    
        <!-- RECENT POSTS -->

<h5><a href="/">最近博文</a></h5>
<div class="widget">
  <ul>
    
    <a href="../../../cn/juc/JUC%E5%85%B1%E4%BA%AB%E6%A8%A1%E5%9E%8B/">
      <li>JUC共享模型</li>
    </a>
    
    <a href="../../../cn/juc/JUC%E6%A8%A1%E5%BC%8F/">
      <li>JUC模式</li>
    </a>
    
    <a href="../../../cn/juc/JUC%E5%BA%94%E7%94%A8/">
      <li>JUC应用</li>
    </a>
    
    <a href="../../../cn/juc/JUC%E5%B9%B6%E5%8F%91%E5%BA%94%E7%94%A8/">
      <li>JUC并发应用</li>
    </a>
    
    <a href="../../../cn/%E9%A1%B9%E7%9B%AE%E6%89%80%E9%9C%80%E7%A8%8B%E5%BA%8F/Canal/">
      <li>Canal</li>
    </a>
    
  </ul>
</div>


        <hr>
    
        <!-- Archives -->

<h5><a href="/archives/">archives</a></h5>
<div class="widget">
  <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="../../2021/11/">November 2021</a><span class="archive-list-count">8</span></li><li class="archive-list-item"><a class="archive-list-link" href="../../2021/10/">October 2021</a><span class="archive-list-count">21</span></li><li class="archive-list-item"><a class="archive-list-link" href="../../2021/09/">September 2021</a><span class="archive-list-count">9</span></li><li class="archive-list-item"><a class="archive-list-link" href="../../2021/08/">August 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="../12/">December 2020</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="../11/">November 2020</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="../10/">October 2020</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="../09/">September 2020</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="">April 2020</a><span class="archive-list-count">10</span></li><li class="archive-list-item"><a class="archive-list-link" href="../03/">March 2020</a><span class="archive-list-count">9</span></li></ul>
</div>


        <hr>
    
        <!-- Categories -->

<h5><a href="/categories/">categories</a></h5>
<div class="widget">
  <ul>
    
    <a href="/categories/#java">
      <li>java</li>
    </a>
    
    <a href="/categories/#juc">
      <li>juc</li>
    </a>
    
    <a href="/categories/#jvm">
      <li>jvm</li>
    </a>
    
    <a href="/categories/#liunx">
      <li>liunx</li>
    </a>
    
    <a href="/categories/#[object Object]">
      <li>[object Object]</li>
    </a>
    
    <a href="/categories/#mysql">
      <li>mysql</li>
    </a>
    
    <a href="/categories/#nginx">
      <li>nginx</li>
    </a>
    
    <a href="/categories/#jdk">
      <li>jdk</li>
    </a>
    
    <a href="/categories/#mysql">
      <li>mysql</li>
    </a>
    
    <a href="/categories/#python">
      <li>python</li>
    </a>
    
    <a href="/categories/#应用服务器">
      <li>应用服务器</li>
    </a>
    
    <a href="/categories/#spring">
      <li>spring</li>
    </a>
    
    <a href="/categories/#设计模式">
      <li>设计模式</li>
    </a>
    
    <a href="/categories/#mybatis">
      <li>mybatis</li>
    </a>
    
  </ul>
</div>


        <hr>
    
</div>


    
  </div>
</div>


		<!-- Footer (contains ThemeColor、viewer) -->
		<!-- Footer -->
<footer>
  <div class="container">
    <div class="row">
      <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
        <ul class="list-inline text-center">
          

          

          

          

          

          

          

          

        </ul>
        <p class="copyright text-muted">
          Copyright &copy;
          zhuang
          2021
          <br>
          Theme by
          <a target="_blank" rel="noopener" href="http://beantech.org">BeanTech</a>
          <span style="display: inline-block; margin: 0 5px;">
            <i class="fa fa-heart"></i>
          </span>
          re-Ported by
          <a target="_blank" rel="noopener" href="https://v-vincen.life/">Live My Life</a>
        </p>
      </div>
    </div>
  </div>
</footer>

<a id="rocket" href="#top" class=""></a>


  <!-- jQuery -->
  <script type="text/javascript" src="/js/jquery.min.js"></script>
  <!-- Bootstrap Core JavaScript -->
  <script type="text/javascript" src="/js/bootstrap.min.js"></script>
  <!-- Custom Theme JavaScript -->
  <script type="text/javascript" src="/js/hux-blog.min.js"></script>
  <!-- catalog -->
  <script async="true" type="text/javascript" src="/js/catalog.js"></script>
  <!-- totop(rocket) -->
  <script async="true" type="text/javascript" src="/js/totop.js"></script>

  
    <!-- Busuanzi JavaScript -->
    <script async="async" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
  

  
    <!-- Scroll start -->
    <script async="async" type="text/javascript" src="/js/scroll.js"></script>
    <!-- Scroll end -->
  

  

  

  
    <!-- ribbon -->
    <script type="text/javascript" src="/js/ribbonDynamic.js"></script>
  

  






  <!-- viewer start -->
  <!-- viewer start (Picture preview) -->
  
    <script async="async" type="text/javascript" src="/js/viewer/viewer.min.js"></script>
    <script async="async" type="text/javascript" src="/js/viewer/pic-viewer.js"></script>
  

  <!-- viewer end -->


<script>
  // async load function
  function async (u, c) {
    var d = document,
      t = 'script',
      o = d.createElement(t),
      s = d.getElementsByTagName(t)[0];
    o.src = u;
    if (c) {
      o.addEventListener('load', function (e) {
        c(null, e);
      }, false);
    }
    s.parentNode.insertBefore(o, s);
  }

  // fastClick.js
  async ("https://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js", function () {
    var $nav = document.querySelector("nav");
    if ($nav)
      FastClick.attach($nav);
    }
  )
</script>

<!-- Because of the native support for backtick-style fenced code blocks right within the Markdown is landed in Github Pages, From V1.6, There is no need for Highlight.js, so Huxblog drops it officially. -
https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0 - https://help.github.com/articles/creating-and-highlighting-code-blocks/ -->
<!-- <script> async ("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function () { hljs.initHighlightingOnLoad(); }) </script> <link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet"> -->

<!-- jquery.tagcloud.js -->
<!-- <script> // only load tagcloud.js in tag.html if ($('#tag_cloud').length !== 0) { async ("http://yoursite-url/js/jquery.tagcloud.js", function () { $.fn.tagcloud.defaults = { // size: { start: 1, end: 1, unit: 'em' }, color: {
start: '#bbbbee', end: '#0085a1' } }; $('#tag_cloud a').tagcloud(); }) } </script> -->


		<!-- Search -->
		
		<div class="popup search-popup local-search-popup">
  <span class="popup-btn-close">
    ESC
  </span>
  <div class="container">
    <div class="row">
      <!-- <div class="col-md-9 col-md-offset-1"> -->
      <div class="col-lg-9 col-lg-offset-1 col-md-10 col-md-offset-1 local-search-content">

        <div class="local-search-header clearfix">

          <div class="local-search-input-wrapper">
            <span class="search-icon">
              <i class="fa fa-search fa-lg" style="margin: 25px 10px 25px 20px;"></i>
            </span>
            <input autocomplete="off" placeholder="搜索..." type="text" id="local-search-input">
          </div>
        </div>
        <div id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>


  
    <script src="/js/ziploader.js"></script>
  
  <script>
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.json";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    // monitor main search box;
    var onPopupClose = function (e) {
      $('.popup').fadeOut(300);
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $('.popup').fadeIn(300);
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }
    // get search zip version
    $.get('/searchVersion.json?t=' + (+new Date()), function (res) {
      if (localStorage.getItem('searchVersion') !== res) {
        localStorage.setItem('searchVersion', res);
        initSearchJson();
      }
    });

    function initSearchJson() {
      initLoad(['/search.flv'], {
        loadOptions: {
          success: function (obj) {
            localStorage.setItem('searchJson', obj['search.json'])
          },
          error: function (e) {
            return console.log(e)
          }
        },
        returnOptions: {
          'json': TYPE_TEXT
        },
        mimeOptions: {
          'json': 'application/json'
        }
      })
    }
    // search function;
    var searchFunc = function (search_id, content_id) {
      'use strict';
      isfetched = true;
      var datas = JSON.parse(localStorage.getItem('searchJson'));
      // console.log(search_id)
      var input = document.getElementById(search_id);
      var resultContent = document.getElementById(content_id);
      var inputEventFunction = function () {
        var searchText = input.value.trim().toLowerCase();
        var keywords = searchText.split(/[\s\-]+/);
        if (keywords.length > 1) {
          keywords.push(searchText);
        }
        var resultItems = [];
        if (searchText.length > 0) {
          // perform local searching
          datas.forEach(function (data) {
            var isMatch = false;
            var hitCount = 0;
            var searchTextCount = 0;
            var title = data.title
              ? data.title.trim()
              : '';
            var titleInLowerCase = title.toLowerCase();
            var content = data.content
              ? data.content.trim().replace(/<[^>]+>/g, "")
              : '';
            var contentInLowerCase = content.toLowerCase();
            var articleUrl = decodeURIComponent(data.url);

            var date = data.date;
            var dateTime = date.replace(/T/, " ").replace(/.000Z/, "");
            var imgUrl = data.header_img;
            


            var indexOfTitle = [];
            var indexOfContent = [];
            // only match articles with not empty titles
            keywords.forEach(function (keyword) {
              function getIndexByWord(word, text, caseSensitive) {
                var wordLen = word.length;
                if (wordLen === 0) {
                  return [];
                }
                var startPosition = 0,
                  position = [],
                  index = [];
                if (!caseSensitive) {
                  text = text.toLowerCase();
                  word = word.toLowerCase();
                }
                while ((position = text.indexOf(word, startPosition)) > -1) {
                  index.push({position: position, word: word});
                  startPosition = position + wordLen;
                }
                return index;
              }
              indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
              indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
            });
            if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
              isMatch = true;
              hitCount = indexOfTitle.length + indexOfContent.length;
            }
            // show search results
            if (isMatch) {
              // sort index by position of keyword
              [indexOfTitle, indexOfContent].forEach(function (index) {
                index.sort(function (itemLeft, itemRight) {
                  if (itemRight.position !== itemLeft.position) {
                    return itemRight.position - itemLeft.position;
                  } else {
                    return itemLeft.word.length - itemRight.word.length;
                  }
                });
              });
              // merge hits into slices
              function mergeIntoSlice(text, start, end, index) {
                var item = index[index.length - 1];
                var position = item.position;
                var word = item.word;
                var hits = [];
                var searchTextCountInSlice = 0;
                while (position + word.length <= end && index.length != 0) {
                  if (word === searchText) {
                    searchTextCountInSlice++;
                  }
                  hits.push({position: position, length: word.length});
                  var wordEnd = position + word.length;
                  // move to next position of hit
                  index.pop();
                  while (index.length != 0) {
                    item = index[index.length - 1];
                    position = item.position;
                    word = item.word;
                    if (wordEnd > position) {
                      index.pop();
                    } else {
                      break;
                    }
                  }
                }
                searchTextCount += searchTextCountInSlice;
                return {hits: hits, start: start, end: end, searchTextCount: searchTextCountInSlice};
              }
              var slicesOfTitle = [];
              if (indexOfTitle.length != 0) {
                slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
              }
              var slicesOfContent = [];
              while (indexOfContent.length != 0) {
                var item = indexOfContent[indexOfContent.length - 1];
                var position = item.position;
                var word = item.word;
                // cut out 100 characters
                var start = position - 20;
                var end = position + 80;
                if (start < 0) {
                  start = 0;
                }
                if (end < position + word.length) {
                  end = position + word.length;
                }
                if (end > content.length) {
                  end = content.length;
                }
                slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
              }
              // sort slices in content by search text's count and hits' count
              slicesOfContent.sort(function (sliceLeft, sliceRight) {
                if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                  return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                  return sliceRight.hits.length - sliceLeft.hits.length;
                } else {
                  return sliceLeft.start - sliceRight.start;
                }
              });
              // select top N slices in content
              var upperBound = parseInt('1');
              if (upperBound >= 0) {
                slicesOfContent = slicesOfContent.slice(0, upperBound);
              }
              // highlight title and content
              function highlightKeyword(text, slice) {
                var result = '';
                var prevEnd = slice.start;
                slice.hits.forEach(function (hit) {
                  result += text.substring(prevEnd, hit.position);
                  var end = hit.position + hit.length;
                  result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                  prevEnd = end;
                });
                result += text.substring(prevEnd, slice.end);
                return result;
              }
              var resultItem = '';

              // if (slicesOfTitle.length != 0) {   resultItem += "<li><a target='_blank' href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>"; } else {   resultItem += "<li><a target='_blank' href='" +
              // articleUrl + "' class='search-result-title'>" + title + "</a>"; } slicesOfContent.forEach(function (slice) {   resultItem += "<a target='_blank' href='" + articleUrl + "'><p class=\"search-result\">" + highlightKeyword(content, slice) +
              // "...</p></a>"; }); resultItem += "</li>";

              if (slicesOfTitle.length != 0) {
                resultItem += "<a target='_blank' href='" + articleUrl + "' class='search-result'><div class='search-result-left'><div class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</div><time class='search-result-date'>" + dateTime + "</time>";
              } else {
                resultItem += "<a target='_blank' href='" + articleUrl + "' class='search-result'><div class='search-result-left'><div class='search-result-title'>" + title + "</div><time class='search-result-date'>" + dateTime + "</time>";
              }
              slicesOfContent.forEach(function (slice) {
                resultItem += "<p class=\"search-result-content\">" + highlightKeyword(content, slice) + "...</p>";
              });
              resultItem += "</div><div class='search-result-right'><img class='media-image' src='" + imgUrl + "' width='64px' height='48px'></img></div></a>";

              resultItems.push({item: resultItem, searchTextCount: searchTextCount, hitCount: hitCount, id: resultItems.length});
            }
          })
        };

        if (keywords.length === 1 && keywords[0] === "") {
          resultContent.innerHTML = '<div id="no-result"></div>'
        } else if (resultItems.length === 0) {
          resultContent.innerHTML = '<div id="no-result"></div>'
        } else {
          resultItems.sort(function (resultLeft, resultRight) {
            if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
              return resultRight.searchTextCount - resultLeft.searchTextCount;
            } else if (resultLeft.hitCount !== resultRight.hitCount) {
              return resultRight.hitCount - resultLeft.hitCount;
            } else {
              return resultRight.id - resultLeft.id;
            }
          });
          var searchResultList = '<div class=\"search-result-list\">';
          resultItems.forEach(function (result) {
            searchResultList += result.item;
          })
          searchResultList += "</div>";
          resultContent.innerHTML = searchResultList;
        }
      }
      if ('auto' === 'auto') {
        input.addEventListener('input', inputEventFunction);
      } else {
        $('.search-icon').click(inputEventFunction);
        input.addEventListener('keypress', function (event) {
          if (event.keyCode === 13) {
            inputEventFunction();
          }
        });
      }
      // remove loading animation
      $('body').css('overflow', '');
      proceedsearch();
    }
    // handle and trigger popup window;
    $('.popup-trigger').click(function (e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc('local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });
    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function (e) {
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 && $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });

    document.addEventListener('mouseup', (e) => {
      var _con = document.querySelector(".local-search-content");
      if (_con) {
        if (!_con.contains(e.target)) {
          onPopupClose();
        }
      }
    });
  </script>


		
	<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [ ["$","$"], ["\\(","\\)"] ],
            skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
            processEscapes: true
        }
    });
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax();
        for (var i = 0; i < all.length; ++i)
            all[i].SourceElement().parentNode.className += ' has-jax';
    });
</script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</body>
</html>
